var access_token = "";
var tuichu = "再按一次退出程序";
var backButtonPress = 0;



(function(e) {

	mui.init({
		keyEventBind: {
			backbutton: true //开启back按键监听
		}
	});

	mui.plusReady(function() {
		plus.navigator.setStatusBarBackground('#3085D0');
		mui.back = function(event) {
			backButtonPress++;
			if(backButtonPress > 1) {
				plus.runtime.quit();
			} else {
				plus.nativeUI.toast(tuichu);
			}
			setTimeout(function() {
				backButtonPress = 0;
			}, 1000);
			return false;
		};

	});

})(mui);
$("#moduleDiv div").click(function() {
	
	
	var typeStr = $(this).find("span").html();
	
	var pageUrl = "warehouseList.html";
	if(typeStr == "盘库操作"){
		pageUrl = "../check/index.html";
	} else if(typeStr == "移库操作" || typeStr == "合托操作"){
		pageUrl = "MoveAndMerge.html";
	} else if(typeStr == "退出"){
		userLogout();
		return;
	}
	
	var postData = {
		pageflag: "index.tml",
		typeStr: typeStr
	}
	var pageChange1 = {
		pageUrl: pageUrl,
		createNew: true,
		postData: postData,
		aniShow: "fade-in"
	}
	pageChange(pageChange1);
});